<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('teamsetting',$postdata);
		exi('设置成功');
	}
	$return['item']=$this->plugin_setting('teamsetting');
	$return['item']['jy_guashop']=$this->plugin_exists('jy_guashop')?1:0;
	$return['item']['footernav'] = !empty($return['item']['footernav']) ? $return['item']['footernav'] : $footernav;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基础设置',
				'list'=>array(
					array('type'=>'switch','title'=>'开启团收益','name'=>'isopen'),
					array('type'=>'radio','title'=>'成为默认等级条件','name'=>'become','options'=>'become'),
					array('type'=>'unitstring','unit'=>'元','title'=>'自购订单总金额','name'=>'buyallfee','show'=>array('become'=>4)),
					array('type'=>'choose_many','title'=>'购买指定商品升级','name'=>'goods_ids','action'=>'jy_weishop/goods.get_goods/many/','choose_title'=>'选择参与的商品','show'=>array('become'=>5)),
					array('type'=>'checkbox','title'=>'团队升级要求','name'=>'level_up_types','options'=>'leveltype','help'=>''),
					array('type'=>'switch','title'=>'是否需要审核','name'=>'isshenhe'),
					array('type'=>'switch','title'=>'是否需要完善资料','name'=>'isinfo'),
					array('type'=>'switch','title'=>'关闭转账功能？','name'=>'isno_zhuan','help'=>''),
					array('type'=>'string','title'=>'团队分享二维码说明','name'=>'share_help'),
					array('type'=>'string','title'=>'团队分享标题','name'=>'teamshare_title'),
					array('type'=>'string','title'=>'团队分享描述','name'=>'teamshare_desc'),
					array('type'=>'richtext','title'=>'团队须知','name'=>'team_xieyi'),
				)
			),
		)
	);
	$return['team_tiaojians']=$this->team_tiaojians;
	$return['leveltype']=$this->level_up_types;
	$return['become']=array('0'=>'无条件','1'=>'后台指定','2'=>'提交申请','3'=>'参与挂卖','4'=>'自购订单总金额','5'=>'指定购买商品');
	$return['level']=$this->level_types;
	$return['htmls']=$htmls;
	exi($return);
}


